package com.onedec.entity;

import java.util.ArrayList;
import java.util.List;

public class OnedecPermissionExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OnedecPermissionExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andPermissionIdIsNull() {
            addCriterion("permission_id is null");
            return (Criteria) this;
        }

        public Criteria andPermissionIdIsNotNull() {
            addCriterion("permission_id is not null");
            return (Criteria) this;
        }

        public Criteria andPermissionIdEqualTo(Integer value) {
            addCriterion("permission_id =", value, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionIdNotEqualTo(Integer value) {
            addCriterion("permission_id <>", value, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionIdGreaterThan(Integer value) {
            addCriterion("permission_id >", value, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("permission_id >=", value, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionIdLessThan(Integer value) {
            addCriterion("permission_id <", value, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionIdLessThanOrEqualTo(Integer value) {
            addCriterion("permission_id <=", value, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionIdIn(List<Integer> values) {
            addCriterion("permission_id in", values, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionIdNotIn(List<Integer> values) {
            addCriterion("permission_id not in", values, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionIdBetween(Integer value1, Integer value2) {
            addCriterion("permission_id between", value1, value2, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionIdNotBetween(Integer value1, Integer value2) {
            addCriterion("permission_id not between", value1, value2, "permissionId");
            return (Criteria) this;
        }

        public Criteria andPermissionNameIsNull() {
            addCriterion("permission_name is null");
            return (Criteria) this;
        }

        public Criteria andPermissionNameIsNotNull() {
            addCriterion("permission_name is not null");
            return (Criteria) this;
        }

        public Criteria andPermissionNameEqualTo(String value) {
            addCriterion("permission_name =", value, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameNotEqualTo(String value) {
            addCriterion("permission_name <>", value, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameGreaterThan(String value) {
            addCriterion("permission_name >", value, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameGreaterThanOrEqualTo(String value) {
            addCriterion("permission_name >=", value, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameLessThan(String value) {
            addCriterion("permission_name <", value, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameLessThanOrEqualTo(String value) {
            addCriterion("permission_name <=", value, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameLike(String value) {
            addCriterion("permission_name like", value, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameNotLike(String value) {
            addCriterion("permission_name not like", value, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameIn(List<String> values) {
            addCriterion("permission_name in", values, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameNotIn(List<String> values) {
            addCriterion("permission_name not in", values, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameBetween(String value1, String value2) {
            addCriterion("permission_name between", value1, value2, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionNameNotBetween(String value1, String value2) {
            addCriterion("permission_name not between", value1, value2, "permissionName");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdIsNull() {
            addCriterion("permission_parent_id is null");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdIsNotNull() {
            addCriterion("permission_parent_id is not null");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdEqualTo(Integer value) {
            addCriterion("permission_parent_id =", value, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdNotEqualTo(Integer value) {
            addCriterion("permission_parent_id <>", value, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdGreaterThan(Integer value) {
            addCriterion("permission_parent_id >", value, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("permission_parent_id >=", value, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdLessThan(Integer value) {
            addCriterion("permission_parent_id <", value, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdLessThanOrEqualTo(Integer value) {
            addCriterion("permission_parent_id <=", value, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdIn(List<Integer> values) {
            addCriterion("permission_parent_id in", values, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdNotIn(List<Integer> values) {
            addCriterion("permission_parent_id not in", values, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdBetween(Integer value1, Integer value2) {
            addCriterion("permission_parent_id between", value1, value2, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionParentIdNotBetween(Integer value1, Integer value2) {
            addCriterion("permission_parent_id not between", value1, value2, "permissionParentId");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlIsNull() {
            addCriterion("permission_url is null");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlIsNotNull() {
            addCriterion("permission_url is not null");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlEqualTo(String value) {
            addCriterion("permission_url =", value, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlNotEqualTo(String value) {
            addCriterion("permission_url <>", value, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlGreaterThan(String value) {
            addCriterion("permission_url >", value, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlGreaterThanOrEqualTo(String value) {
            addCriterion("permission_url >=", value, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlLessThan(String value) {
            addCriterion("permission_url <", value, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlLessThanOrEqualTo(String value) {
            addCriterion("permission_url <=", value, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlLike(String value) {
            addCriterion("permission_url like", value, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlNotLike(String value) {
            addCriterion("permission_url not like", value, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlIn(List<String> values) {
            addCriterion("permission_url in", values, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlNotIn(List<String> values) {
            addCriterion("permission_url not in", values, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlBetween(String value1, String value2) {
            addCriterion("permission_url between", value1, value2, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionUrlNotBetween(String value1, String value2) {
            addCriterion("permission_url not between", value1, value2, "permissionUrl");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelIsNull() {
            addCriterion("permission_level is null");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelIsNotNull() {
            addCriterion("permission_level is not null");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelEqualTo(Byte value) {
            addCriterion("permission_level =", value, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelNotEqualTo(Byte value) {
            addCriterion("permission_level <>", value, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelGreaterThan(Byte value) {
            addCriterion("permission_level >", value, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelGreaterThanOrEqualTo(Byte value) {
            addCriterion("permission_level >=", value, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelLessThan(Byte value) {
            addCriterion("permission_level <", value, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelLessThanOrEqualTo(Byte value) {
            addCriterion("permission_level <=", value, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelIn(List<Byte> values) {
            addCriterion("permission_level in", values, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelNotIn(List<Byte> values) {
            addCriterion("permission_level not in", values, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelBetween(Byte value1, Byte value2) {
            addCriterion("permission_level between", value1, value2, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionLevelNotBetween(Byte value1, Byte value2) {
            addCriterion("permission_level not between", value1, value2, "permissionLevel");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1IsNull() {
            addCriterion("permission_bak1 is null");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1IsNotNull() {
            addCriterion("permission_bak1 is not null");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1EqualTo(String value) {
            addCriterion("permission_bak1 =", value, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1NotEqualTo(String value) {
            addCriterion("permission_bak1 <>", value, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1GreaterThan(String value) {
            addCriterion("permission_bak1 >", value, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1GreaterThanOrEqualTo(String value) {
            addCriterion("permission_bak1 >=", value, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1LessThan(String value) {
            addCriterion("permission_bak1 <", value, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1LessThanOrEqualTo(String value) {
            addCriterion("permission_bak1 <=", value, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1Like(String value) {
            addCriterion("permission_bak1 like", value, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1NotLike(String value) {
            addCriterion("permission_bak1 not like", value, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1In(List<String> values) {
            addCriterion("permission_bak1 in", values, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1NotIn(List<String> values) {
            addCriterion("permission_bak1 not in", values, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1Between(String value1, String value2) {
            addCriterion("permission_bak1 between", value1, value2, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak1NotBetween(String value1, String value2) {
            addCriterion("permission_bak1 not between", value1, value2, "permissionBak1");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2IsNull() {
            addCriterion("permission_bak2 is null");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2IsNotNull() {
            addCriterion("permission_bak2 is not null");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2EqualTo(String value) {
            addCriterion("permission_bak2 =", value, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2NotEqualTo(String value) {
            addCriterion("permission_bak2 <>", value, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2GreaterThan(String value) {
            addCriterion("permission_bak2 >", value, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2GreaterThanOrEqualTo(String value) {
            addCriterion("permission_bak2 >=", value, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2LessThan(String value) {
            addCriterion("permission_bak2 <", value, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2LessThanOrEqualTo(String value) {
            addCriterion("permission_bak2 <=", value, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2Like(String value) {
            addCriterion("permission_bak2 like", value, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2NotLike(String value) {
            addCriterion("permission_bak2 not like", value, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2In(List<String> values) {
            addCriterion("permission_bak2 in", values, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2NotIn(List<String> values) {
            addCriterion("permission_bak2 not in", values, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2Between(String value1, String value2) {
            addCriterion("permission_bak2 between", value1, value2, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak2NotBetween(String value1, String value2) {
            addCriterion("permission_bak2 not between", value1, value2, "permissionBak2");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3IsNull() {
            addCriterion("permission_bak3 is null");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3IsNotNull() {
            addCriterion("permission_bak3 is not null");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3EqualTo(String value) {
            addCriterion("permission_bak3 =", value, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3NotEqualTo(String value) {
            addCriterion("permission_bak3 <>", value, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3GreaterThan(String value) {
            addCriterion("permission_bak3 >", value, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3GreaterThanOrEqualTo(String value) {
            addCriterion("permission_bak3 >=", value, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3LessThan(String value) {
            addCriterion("permission_bak3 <", value, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3LessThanOrEqualTo(String value) {
            addCriterion("permission_bak3 <=", value, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3Like(String value) {
            addCriterion("permission_bak3 like", value, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3NotLike(String value) {
            addCriterion("permission_bak3 not like", value, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3In(List<String> values) {
            addCriterion("permission_bak3 in", values, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3NotIn(List<String> values) {
            addCriterion("permission_bak3 not in", values, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3Between(String value1, String value2) {
            addCriterion("permission_bak3 between", value1, value2, "permissionBak3");
            return (Criteria) this;
        }

        public Criteria andPermissionBak3NotBetween(String value1, String value2) {
            addCriterion("permission_bak3 not between", value1, value2, "permissionBak3");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}